/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dawnland02.model.action;

import dawnland02.data.map.model.MatrixDirection;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Petru Obreja (obrejap@yahoo.com)
 */
public class ActionFactory {
    public static Action createBuildRoadAction(){
        Action action = new Action(ActionType.BUILD_ROAD);
        return action;
    }

    public static Action createMoveAction(Integer adiacentMatrixCellId){
        Map<ActionParam, Object> actionParams = new HashMap<ActionParam, Object>();
        actionParams.put(ActionParam.MOVE_DESTINATION, adiacentMatrixCellId);
        Action action = new Action(ActionType.MOVE, actionParams);
        return action;
    }

    public static Action createDirectionAction(MatrixDirection direction){
        Map<ActionParam, Object> actionParams = new HashMap<ActionParam, Object>();
        actionParams.put(ActionParam.ROTATE_DIRECTION, direction);
        Action action = new Action(ActionType.ROTATE, actionParams);
        return action;
    }
}
